/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-26 11:22:53
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-03-26 09:52:23
 * @FilePath: /yt-devops/lib/model/device_obj/group_model.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:json_annotation/json_annotation.dart';
import 'package:yt_devops/utils/enums.dart';

import 'authority_config_model.dart';
import 'product_config_model.dart';

part 'group_config_model.g.dart';

@JsonSerializable()
class GroupConfigModel<T> extends ProductConfigModel<T> {
  String? logo;

  List<AuthorityModelConfig>? authority;

  DeviceModelShowType? showType;

  String? tip;

  GroupConfigModel(
      {required String? id,
      String? name,
      this.logo,
      int? sortOrder,
      String? parentId,
      this.authority,
      this.tip})
      : super(
          id: id ?? '',
          parentId: parentId,
          name: name ?? '',
          type: DeviceConfigType.group,
        );

  factory GroupConfigModel.fromJson(Map<String, dynamic> json) =>
      _$GroupConfigModelFromJson(json);

  Map<String, dynamic> toJson() => _$GroupConfigModelToJson(this);
}
